package com.news.service.impl;


import com.news.dao.UserDao;
import com.news.dao.impl.UserDaoImpl;
import com.news.pojo.User;
import com.news.service.UserService;

/**
 * @create 2021 -06 -01 11:20
 */


public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();
    /**
     * 新增用户
     *
     * @param user
     * @return
     */
    @Override
    public boolean addUser(User user) {
        return false;
    }

    /**
     * 删除用户
     *
     * @param uid
     * @return
     */
    @Override
    public boolean delUser(int uid) {
        return false;
    }

    /**
     * 修改用户
     *
     * @param user
     * @return
     */
    @Override
    public boolean updateUser(User user) {
        return false;
    }

    /**
     * 登录
     *
     * @param user
     * @return
     */
    @Override
    public User login(User user) {
//        if(user == null){
////            return null;
////        }else{
////            User loginUser = userDao.getUserByName(user.getUname());
////            if(loginUser == null){
////                System.out.println("账号不存在！");
////            }else{
////                if(loginUser.getUpwd().equals(user.getUpwd())){
////                    return loginUser;
////                }else{
////                    System.out.println("账号或密码不匹配！");
////                }
////            }
////        }
        return null;
    }
}
